package bairui.international.weixin.portal.miniapp.controller.college.college;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.TB_CollegeCategory;
import bairui.international.service.Service_CollegeCategory;
import bairui.international.service.Service_CollegeCategoryRollImage;

/**
 *
 * 获取分类
 *
 * @generated
 * 
 * @see STest_C_College_GetCategory_Get 测试
 *
 */
@Controller
public class C_College_GetCategory_Get
 extends SC_College_GetCategory_Get 
{
	
	@Autowired private Service_CollegeCategory service_CollegeCategory;
	@Autowired private Service_CollegeCategoryRollImage service_CollegeCategoryRollImage;
	
	/**
	 * Get请求
	 */
	@Action(Get.class)
	@GetMapping(Get.RequestMappingValue)
	public @FomatOutput @ResponseBody Object get(
		ModelMap map, HttpServletRequest request, 
		@PathVariable(name=Get.PathVariableName.Id) long id
	) throws Exception {
		TB_CollegeCategory bean = service_CollegeCategory.findById(id);
		//
		return new CategoryOutput(bean, service_CollegeCategoryRollImage);
	}
	

}
